Repository navigation
Storybook: a whole custom host UI on the core alone - #120
Merged
Merged
Conversation
agorischek
force-pushed
the
pane-band-inset
branch
from
November 20, 2026 23:45
4b0cd23 to
d6c36d2
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 20, 2026 23:45
5aea02b to
0bc7aea
Compare
agorischek
force-pushed
the
pane-band-inset
branch
from
November 20, 2026 23:49
d6c36d2 to
d72229d
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 20, 2026 23:50
0bc7aea to
440d6a0
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Summary facts without item IDs hide all rows when clicked, and activating an already-selected row does not clear selection despite its toggle semantics.
2 open issues
What changed in this PR
Adds a complete Storybook example showing how to build a custom host UI using the headless core without a UI package.
Changes:
- Demonstrates view, mode, scope, playback, search, row selection, and summary controls across three stories.
- Adds browser coverage for Space playback, keyboard view selection, and playback availability in the text view.
- Links the example from the embedding guide and Storybook README.
| File | Description |
|---|---|
tools/storybook/stories/core/custom-host.stories.tsx |
Adds the custom host UI and three story variants. |
tools/storybook/README.md |
Lists the example and its demonstrated APIs. |
tools/storybook/browser/custom-host.spec.ts |
Tests keyboard controls and playback visibility. |
docs/guides/embedding.md |
Points embedding developers to the complete example. |
Review effort: Balanced
agorischek
force-pushed
the
pane-band-inset
branch
from
November 21, 2026 00:43
d72229d to
f14dd0d
Compare
agorischek
force-pushed
the
custom-host-story
branch
2 times, most recently
from
November 21, 2026 01:08
7139040 to
e76b42b
Compare
agorischek
force-pushed
the
pane-band-inset
branch
2 times, most recently
from
November 21, 2026 01:37
a3aaa45 to
747c30e
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 21, 2026 01:37
e76b42b to
a975290
Compare
agorischek
force-pushed
the
pane-band-inset
branch
from
November 21, 2026 15:19
747c30e to
b3c9f7b
Compare
agorischek
force-pushed
the
custom-host-story
branch
2 times, most recently
from
November 21, 2026 16:08
913cebe to
ddb61e9
Compare
agorischek
force-pushed
the
pane-band-inset
branch
from
November 21, 2026 16:08
b3c9f7b to
c2fe6f2
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 21, 2026 17:39
ddb61e9 to
c1ed338
Compare
agorischek
force-pushed
the
pane-band-inset
branch
from
November 21, 2026 17:39
c2fe6f2 to
4346c5a
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 21, 2026 18:28
c1ed338 to
91db1d3
Compare
agorischek
force-pushed
the
pane-band-inset
branch
2 times, most recently
from
November 21, 2026 19:07
243349f to
7c92224
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 21, 2026 19:07
91db1d3 to
78a7998
Compare
The rule for when a running job's indicator shows (after 300 ms, then for at least 400 ms) lived in the VS Code UI, so the default UI's "Updating…" chip showed for every job, however short. The rule is now the core's: `runningIndicator` and its constants at `@githubnext/projections-host/running` (no React or DOM, for the VS Code extension host), and `useRunningIndicator`, which the default UI's chip and the VS Code UI's summary bar both use. The VS Code UI's `./running` entry re-exports it, so the extension is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The running indicator's minimum started while a loading pane kept the chip hidden, so a chip revealed as the renderer became ready could vanish at once. The latch now lives only while no pane is loading. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Inspector wrote revision labels as `name · detail · when`, and four places read them back by splitting on ` · ` with their own rules: the default UI's and the VS Code UI's pair pickers (one trimmed, one didn't), the pane chips (with an age heuristic) and the pane label bands. The core now owns the format: `formatRevisionLabel`, `parseRevisionLabel`, `revisionLabelName` and `revisionAge` (the Inspector's `age`, moved). Every reader and the Inspector's writer use them; `shortRevisionLabel` and the Inspector's `age` keep their names. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The pane label band (side by side's and swipe's revision headers) set `padding: 0 10px` inline, so a host lining its labels up with its own layout had to override the band with `!important`, as the Playground's Primer UI does. The band now reads `--pj-pane-band-inset` (10px by default), or `--pj-pane-band-inset-start` and `-end` apart, beside its existing `--pj-pane-band-bg`, `-fg` and `-rule`. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
`Core/Custom host` is the example a team with its own design system starts from: plain elements, no UI package, and every decision the core's (`useViewChoice`, `viewControls`, `scopeChoice`, `playButton`, the Space shortcut, `rovingIndex`, `summaryToggle`), so it behaves as the default and VS Code UIs do. The smoke suite renders it like every story, and a small spec checks Space from its toolbar and the arrow keys in its view switch. The embedding guide points to it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… row clears on a second press Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
agorischek
force-pushed
the
pane-band-inset
branch
from
November 21, 2026 20:34
7c92224 to
8c665dd
Compare
agorischek
force-pushed
the
custom-host-story
branch
from
November 21, 2026 20:34
78a7998 to
3378fae
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Stacked on #119. This is item G11 of the headless-host plan ("docs and examples"), its example half.
Why
The only "core alone" examples were a 10-line snippet in
docs/guides/embedding.mdandCore/Projection stage, a find field, a mode select and a slider. Nothing showed a realistic custom UI, or exercised the headless APIs without the default UI.What it adds
tools/storybook/stories/core/custom-host.stories.tsx(Core/Custom host): a whole host UI in plain elements, importing only@githubnext/projections-host. It has:useViewChoice, as a radio group, plus a table ofvisibleRowsfor the built-in views;viewControls;scopeChoice, including the "nothing hidden" note) with arrows, Home and End fromrovingIndex;playButton, the slider, and Space from the toolbar (handlePlaybackShortcut);summaryToggle,summaryToggleTitle).The stories are Animated, Side by side and One extraction. Everything in the file is presentation.
tools/storybook/browser/custom-host.spec.ts: Space from the toolbar plays and pauses; End in the view switch moves to Text and focuses it; playback stays beside the text view in Animated.The smoke suite also renders each story without console errors.
docs/guides/embedding.mdand the Storybook README point to it.It serves as a conformance check too: the story fails to type-check if a headless API it relies on changes shape.
Checks
tools check --fast: pass.